<?php

if (!defined('PUBLIC_HTML'))
{
	exit;
}

$page_title = 'User overview';

if ($user->is_admin)
{
	$tpl->zone("ADMIN", array());
}

$tpl->set_boolean('is_admin', false);

$database->query("SELECT * FROM " . TABLE_USERS);
foreach ($database->resultSet() as $row_users)
{
	$tpl->zone('users', array(
		'ID1'		=> (int)	$row_users['usr_id'],
		'ID2'		=> (int)	$row_users['usr_id'],
		'USERNAME'	=> (string)	$row_users['usr_name'],
		'LEVEL'		=> ((int) $row_users['usr_level'] == 1) ? 'Full' : 'Normal',
		'STATUS'	=> ((int) $row_users['usr_active'] == 1) ? 'Active' : 'Disabled'
	));
}

?>